package com.iron.sfm.api.feign;

import com.iron.common.core.constant.ServiceNameConstant;
import com.iron.common.core.util.R;
import com.iron.common.feign.config.IronFeignConfiguration;
import com.iron.sfm.api.entity.SysLog;
import com.iron.sfm.api.feign.factory.SysLogFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = ServiceNameConstant.IRON_SFM, configuration = IronFeignConfiguration.class, fallbackFactory = SysLogFeignFallbackFactory.class)
public interface SysLogFeign {

    /**
     * 保存日志
     *
     * @param sysLog 日志实体
     * @return
     */
    @PostMapping("/log")
    R<Boolean> saveLog(@RequestBody SysLog sysLog);
}
